<?php
	function sanitize($data){
		return mysql_real_escape_string($data);
	}

	function protectPage(){
		if(logged_in() === FALSE){
			header("Location: rescrition.php");
			exit();
		}
	}

	function loggedInRediret(){
		if(logged_in() === TRUE){
			header("Location: index.php");
			exit();
		}
	}
	function change_password($customer_id, $password){
		$customer_id = (int)$customer_id;
		$password = md5($password);

		mysql_query("UPDATE customer SET password_md5 WHERE customerID = $customer_id");
	}
?>